package com.arch.dev.server.dao.impl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.arch.dev.server.bean.Catagory;
import com.arch.dev.server.dao.CatagoryDao;

public class CatagoryDaoImpl extends HibernateDaoSupport implements CatagoryDao {

	public void saveCatagory(Catagory catagory) {

		getHibernateTemplate().saveOrUpdate(catagory);

	}

	public List<Catagory> getAllValues() {

		List<Catagory> catagoryList = getHibernateTemplate().loadAll(
				Catagory.class);

		return catagoryList;

	}

	@Override
	public void removeCatagory(Catagory catagory) {
		getHibernateTemplate().delete(catagory);

	}

}